package com.rightsidetech.trade.dtos.request;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;

@Data
public class TdAddUpdateBuyCarDetailZPReq implements Serializable {
    @ApiModelProperty("id, 更新必填")
    private Long id;

    @ApiModelProperty("购物车id")
    private Long buyCarId;

    @ApiModelProperty("商品id")
    private Long commodityId;

    @ApiModelProperty("商品名称")
    private String commodityName;

/*
    @ApiModelProperty("购买方式,  0-直接买新, 1-以旧换新")
    @Range(min = 0,max = 1,message = "购买方式不正确")
    private Byte buyType;
*/

    @ApiModelProperty("商品条码")
    private String commodityBarCode;

    @ApiModelProperty("商品规格")
    private String commoditySpecs;

    @ApiModelProperty("原价")
    private BigDecimal underlinedPrice;

    @ApiModelProperty("单件价格")
    private BigDecimal commodityPrice;

    @ApiModelProperty("商品数量")
    private Integer commodityNum;

    @ApiModelProperty("商品标签, 0-商品, 1-赠品, 2-超值换购")
    @Range(min = 1,max = 2,message = "商品标签不正确")
    private Byte commodityTag;

    @ApiModelProperty("商品图片")
    private String picture;

    @ApiModelProperty("需要换购的商品的id")
    @NotNull(message = "需要换购商品的id不能为空")
    private Long parentId;
}
